package signAction;

import java.sql.SQLException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import signBean.Manager;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class AdminLookAction extends ActionSupport{
	
	private String username;
	private String password;
	private String age;
	private String address;
	private String ii;
	private String uid;
	private String id;
	
	
	public int aa;
	  List li;
	  int ddd;
	  int sign=1;
	public int getSign() {
		return sign;
	}
	public void setSign(int sign) {
		this.sign = sign;
	}
	public int getDdd() {
		return ddd;
	}
	public void setDdd(int ddd) {
		this.ddd = ddd;
	}
	public List getLi() {
		return li;
	}
	public void setLi(List li) {
		this.li = li;
	}
	public String getIi() {
		return ii;
	}
	public void setIi(String ii) {
		this.ii = ii;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String execute() throws SQLException{
		
		  Manager na=new Manager();
		   String i =getIi();
			
		    li=new Manager().select(i);
		  
		    System.out.println(i);
		    System.out.println(uid+"asdf");
		    this.setId(uid);
			
	          setLi(li);
	         
	    setDdd(getAa());
	    HttpServletRequest  request = ServletActionContext.getRequest();
	    request.getSession().setAttribute("ddd",getAa());
		   return "edit";
		
	}
	public int getAa() {
		return aa;
	}
	public void setAa(int aa) {
		this.aa = aa;
	}
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	
	
	
}
